package com.untour.im.client.handler;

import com.alibaba.fastjson2.JSON;
import com.untour.im.codec.protocol.packet.response.body.MessageResponsePacketData;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;

/**
 * 收到服务的消息处理
 */
@Slf4j
public class ServerResponseMessageHandler extends SimpleChannelInboundHandler<MessageResponsePacketData> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, MessageResponsePacketData responsePacketData) {
        log.info("接受到服务端消息:{}", JSON.toJSONString(responsePacketData));
    }
}
